<template>

  <div class="asideNav">
    <a href="javascript:;" :class="['nav-btn',{active:active}]" @click="navBtn">导航</a>
    <div :class="{activeBg:active}" v-if="true">
      <div class="mask"></div>
      <div class="content">

        <div class="top-icon">
          <a href="#"><img src="../common/images/index.png"></a>
          <a href="#"><img src="../common/images/search.png"></a>
        </div>

        <div class="pro-list">
          <ul>
            <li>
              <a href="#">
                今日推荐
              </a>
            </li>
            <li>
              <a href="#">
                时尚
              </a>
            </li>
            <li>
              <a href="#">
                美妆
              </a>
            </li>
            <li>
              <a href="#">
                居家
              </a>
            </li>
            <li>
              <a href="#">
                母婴盛典
              </a>
            </li>
            <li>
              <a href="#">
                国际
              </a>
            </li>
            <li>
              <a href="#">
                唯品.奢
              </a>
            </li>
            <li>
              <a href="#">
                生活
              </a>
            </li>
          </ul>
        </div>

        <div class="footer-tip">

          <ul>

            <li>
              <a href="#">
                <img src="../common/images/heart2.png" alt="">
                <span>收藏</span>
              </a>
            </li>
            <li>
              <a href="#">
                <img src="../common/images/pcenter.png" alt="">
                <span>个人中心</span>
              </a>
            </li>
            <li>
              <a href="#">
                <img src="../common/images/app.png" alt="">
                <span>下载App</span>
              </a>
            </li>

          </ul>

          <div class="close">
            <img src="../common/images/bigClose.png" alt="" @click="closeFun">
          </div>
        </div>
      </div>
    </div>
  </div>

</template>

<script>

  export default {
    data() {
      return {
        active: false
      }
    },
    methods: {
      navBtn() {
        this.active = true
      },
      closeFun(){
        this.active = false
      }

    }
  }
</script>

<style scoped rel='stylesheet/scss' lang='scss'>
  .asideNav{
    position: relative;
  }
  .nav-btn {
    position: fixed;
    width: 75px;
    height: 75px;
    border-radius: 100%;
    bottom: 100px;
    left: 20px;
    background: #1c1e25;
    text-align: center;
    line-height: 60px;
    color: #fff;
    z-index: 990;
    font-size: 22px;
  }
  .active {
    animation: move .5s ease;
  }

  @keyframes move {
    20% {
      transform: scale(1.2);
    }
    100% {
      transform: scale(0);
    }
  }

  .activeBg{
    width: 100%;
    height: 100vh;
    /*animation: changeBg 1.5s .5s ease forwards;*/
    .mask{
      position: fixed;
      bottom: 100px;
      width: 60px;
      height: 60px;

      z-index: 1000;
      background: rgba(36,40,49,.97);
      border-radius: 100%;
      animation: changeBg 1.5s .5s ease forwards;
    }
    @keyframes changeBg {
      0%{
        transform: scale(1) translate3d(0,0,0);
      }
      100%{
        transform: scale(100) translate3d(10px,-10px,0);


      }
    }

    .content{
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index:1000;
      width: 100%;
      height: 100vh;
    }
  }
  .top-icon{
    margin-left: 3.75rem;
    width: 300px;
    height: 200px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    a:nth-child(1){
      margin-left: .5rem;
    }
    a:nth-child(2){
      margin-right: .5rem;
    }
    a{
      position: relative;
      width: 43px;
      height: 43px;
      img{
        width: 43px;
        height: 43px;
      }
    }
  }
  .pro-list ul{
    margin-top: 1.5rem;
    width: 100%;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: row wrap;
    text-align: center;
  }
  .pro-list ul li{
    width: 25%;
    height: 1rem;
    line-height: 1rem;
  }
  .pro-list ul li a{
    font-size: .3rem;
    color: #fff;
  }

  .footer-tip ul{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem auto 0;
    text-align: center;
  }
  .footer-tip ul li{
    width: 2.2rem;
  }
  .footer-tip ul li a{
    display: block;
    color: #dfdfe1;
  }
  .footer-tip ul img{
    width: .43rem;
    height: auto;
    margin: 0 auto .14rem;
  }

  .close{
    width: 100%;
    margin-top: .7rem;
  }

  .close img{
    width: .4rem;
    height: .4rem;
    margin: 0 auto;

  }

</style>
